# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="The core libraries and a command line rendering utility for Synfig,
an industrial-strength vector-based 2D animation software package."

MY_P=${PN}-${PV/_p/-}
S=${WORKDIR}/${MY_P}

# currently :
# https://sourceforge.net/projects/synfig/
# http://www.deepdarc.com/2005/11/01/synfig-developer-preview/
HOMEPAGE="http://www.synfig.com"
SRC_URI="http://www.bridgetone.com/voria/files/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
# KEYWORDS need to be updated
KEYWORDS="x86"
IUSE="imagemagick ffmpeg libdv openexr freetype"

RDEPEND=">=dev-libs/libsigc++-2.0.0
>=dev-cpp/libxmlpp-2.6.1
>=dev-cpp/ETL-0.04.06
imagemagick? ( media-gfx/imagemagick )
ffmpeg? ( media-video/ffmpeg )
libdv? ( media-libs/libdv )
openexr? ( media-libs/openexr )
freetype? ( >=media-libs/freetype-2.1.9 )"

DEPEND="${RDEPEND}"

src_compile() {
	econf \
		$(use_with imagemagick ) \
		$(use_with ffmpeg ) \
		$(use_with libdv ) \
		$(use_with openexr ) \
		$(use_with freetype ) \
		|| die "Configure failed!"
	emake || die "emake failed"
}

src_install() {
	make DESTDIR="${D}" install || die "Install failed!"
	dodoc doc/hw-gfx-mapping.txt
	dodoc examples/*
}

